<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib uri="/struts-tags" prefix="s"%>    
<%@taglib uri="/struts-jquery-tags" prefix="sj" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
	<link href="/passeport-animalier/css/main.css" rel="stylesheet" type="text/css"/>
	<script type="text/javascript">
		function change(id){
			  var selectElmt = document.getElementById("select"+id);
			   var span = document.getElementById("span"+id);
			   var textselectionne = selectElmt.options[selectElmt.selectedIndex].text;
			   span.innerHTML=textselectionne;
					
		}
	</script>
</head>
<body>
	<div class="content" style="padding-bottom: 0px;">
	  <s:if test="hasActionErrors()">
 		<div class="nNote nFailure">
		  <p id="actionError">
		  </p>
		</div> 
 		</s:if>
		<div class="widget first" >
		  <div class="head">
			<h5 class="iList"> <s:text name="form.creation"/> </h5>
		  </div>
		  <div class="body">
			<s:form action="" namespace="veterinaire" cssClass="mainForm" method="post" theme="simple" id="form_veterinaire"  >
			  <div class="widget first" style="margin-top: 0px;margin-bottom:0px;" id="widget1" >
			    <input type="hidden" value="${idBetail}" name="idBetail"/>
			    <div class="rowElem">
			      <label> <s:text name="maladie.nom"/> </label>
				    <div class="formRight" style="margin: 3px;">
				      <sj:autocompleter id="listMaladies" list="%{listMaladies}" name="maladie.nom" />
					   <span class="field_error" id="span_maladie.nom"> <s:property value="errors['maladie.nom']"/> </span>
					</div>
					<div class="fix"></div>
			    </div>
			    <div class="rowElem" >
				  <label> <s:text name="ordonnance.description"/> </label>
				  <div class="formRight" style="margin: 3px;">
				    <textarea name="ordonnance.description" id="ordonnance.description">
				    </textarea>
					<span class="field_error" id="span_ordonnance.description"> <s:property value="errors['ordonnance.description']"/> </span>
				  </div>
				  <div class="fix"></div>
			    </div>
				<div class="fix"></div>
			    </div>
				<div class="widget first" style="margin-top: 0px;display: none;margin-bottom:0px;" id="widget2">
				  <div class="rowElem">
			        <label> <s:text name="medicament.nom"/> </label>
					<div class="formRight" style="margin: 3px;">
					   <sj:autocompleter id="listMedicaments" list="%{listMedicaments}" name="medicament.nom" />
					   <span class="field_error" id="span_medicament.nom"> <s:property value="errors['medicament.nom']"/> </span>
					</div>
					<div class="fix"></div>
			      </div>
			      <div class="rowElem">
					<label> <s:text name="traitement.debutTraitement"/> </label>
					<div class="formRight" style="margin: 3px;">
					  <sj:datepicker id="date0" displayFormat="dd/mm/yy" name="traitement.debutTraitement" buttonImage="/passeport-animalier/images/icons/color/calendar-day-10.png">
					  </sj:datepicker>
				      <span class="field_error" id="span_traitement.debutTraitement"> <s:property value="errors['traitement.debutTraitement']"/> </span>
				    </div>
				    <div class="fix"></div>
				  </div>
				  <div class="rowElem">
					<label> <s:text name="traitement.finTraitement"/> </label>
					<div class="formRight" style="margin: 3px;">
					  <sj:datepicker id="date1" displayFormat="dd/mm/yy" name="traitement.finTraitement" buttonImage="/passeport-animalier/images/icons/color/calendar-day-10.png">
					  </sj:datepicker>
				      <span class="field_error" id="span_traitement.finTraitement"> <s:property value="errors['traitement.finTraitement']"/> </span>
				    </div>
				    <div class="fix"></div>
				  </div>
				  <div class="rowElem">
				 	<label> <s:text name="traitement.dosage"/> </label>
					<div class="formRight" style="margin: 3px;">
					  <input type="text" value="${traitement.dosage}" name="traitement.dosage" style="width:50%;" id="traitement.dosage">
					  <span class="field_error" id="span_traitement.dosage"> <s:property value="errors['traitement.dosage]"/> </span>
					</div>
					<div class="fix"></div>
			      </div>
			      
			      <div class="rowElem">
				    <label> <s:text name="dossage.uniteDossage"/> </label>
					<div class="formRight" style="margin: 3px;">
					  <div class="selector" id="uniform-undefined">
					    <span style="-moz-user-select: none;" id="span2"> <s:property value="%{unitesDossage[0]}"/> </span>
					    <s:select list="unitesDossage" name="traitement.uniteDossage" cssStyle="opacity:0;" id="select2" onclick="change(2);"/>
					  </div>
					  <span class="field_error" id="span_traitement.uniteDossage"> <s:property value="errors['traitement.uniteDossage]"/> </span>
					</div>
					<div class="fix"></div>
			      </div>
			      
			      <div class="rowElem">
				    <label> <s:text name="traitement.rytheme"/> </label>
					<div class="formRight" style="margin: 3px;">
				      <input type="text" value="${traitement.rytheme}" name="traitement.rytheme" style="width:50%;" id="traitement.rytheme">
					  <span class="field_error" id="span_traitement.rytheme"> <s:property value="errors['traitement.rytheme]"/> </span>
					</div>
					<div class="fix"></div>
			      </div>
			      <div class="rowElem">
				    <label> <s:text name="dossage.uniteRytheme"/> </label>
					<div class="formRight" style="margin: 3px;">
					  <div class="selector" id="uniform-undefined">
					    <span style="-moz-user-select: none;" id="span1"> <s:property value="%{unitesRytheme[0]}"/> </span>
						  <s:select list="unitesRytheme" name="traitement.uniteRytheme" cssStyle="opacity:0;" id="select1" onclick="change(1);"/>
					  </div>
					  <span class="field_error" id="span_traitement.uniteRytheme"> <s:property value="errors['traitement.uniteRytheme]"/> </span>
					</div>
					<div class="fix"></div>
			      </div>
				</div>
			  </s:form>
			 </div> 
		    </div>
	    </div>
</body>
</html>